package progress.exa8;

public class GenericMethod {

    public static void main(String[] args) {
        String middle = GenericMethod.<String>getMiddle("join","R","fasd");
        System.out.println(middle);
    }


    /**
     * 泛型方法定义,获取入参输入的中间的元素
     * @param a
     * @param <T>
     * @return
     */
    public static <T> T getMiddle(T... a){
        return a[a.length/2];
    }

}
